package com.grade.service.Impl;

import com.grade.Beans.Subjects;
import com.grade.mapper.SubjectsMapper;
import com.grade.service.SubjectsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;
@Service
public class SubjectsServiceImpl implements SubjectsService {
    @Autowired
    SubjectsMapper subjectsMapper;
    @Override
    public List<Subjects> findBySubjectsPage(Map map) {
        return subjectsMapper.findBySubjectsPage(map);
    }

    @Override
    public int findBySubjects(Map map) {
        return subjectsMapper.findBySubjects(map);
    }

    @Override
    public int addSubjects(Subjects subjects) {
        return subjectsMapper.addSubjects(subjects);
    }

    @Override
    public Subjects findByName(String name) {
        return subjectsMapper.findByName(name);
    }

    @Override
    public int deleteSubjects(int id) {
        return subjectsMapper.deleteSubjects(id);
    }

    @Override
    public int updateSubjects(Subjects subjects) {
        return subjectsMapper.updateSubjects(subjects);
    }

    @Override
    public List<Subjects> findAll() {
        return subjectsMapper.findAll();
    }
}
